#include <iostream>
#include <string>
#include <sys/types.h>
#include <signal.h>
#include <unistd.h>

using namespace std;

int main(int argc, char** argv)
{
    if (argc != 3)
    {
        std::cout << "Usage:\n\t./mykill -signo pid" << std::endl;
        exit(1);
    }

    int sig = stoi(argv[1] + 1);
    int pid = stoi(argv[2]);

    if (kill(pid, sig) < 0)
    {
        perror("mykill");
    }
    else
    {
        std::cout << "kill -" << sig << " " << pid << std::endl;
    }

    return 0;
}

